Repository navigation
fix(engine): compare the command surface snapshot without CRLF - #2759
Conversation
A Windows checkout converts crates/engine/command-surface.txt to CRLF, so include_str! no longer equals the LF text the registry produces and command_surface_matches_the_snapshot fails on windows-latest with "the same ids and keys, but a repeated id or another order". Normalise the saved text's line endings before comparing.
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Code reviewBugs
Security
Performance
Quality
AGENTS.md
Prior concerns
Change sizeCompared: the whole PR against main (merge base 12ffc6c to PR head 556e4bd).
|
📖 Docs preview
GitHub Pages takes a minute or two to publish a new commit. |
Fixes the red
test / Test (windows-latest)job on main (run 45102482280, commit 12ffc6c), from #2738.Cause: a Windows checkout (
core.autocrlf) convertscrates/engine/command-surface.txtto CRLF.include_str!embeds those line endings, so the saved text never equals the LF textsurface::textbuilds from the registry. Ids and keys all match, which is why the failure read "the same ids and keys, but a repeated id or another order".Fix:
command_surface_matches_the_snapshotturns CRLF into LF in the saved snapshot before comparing.cargo xtask commandsstill writes LF, and a real change to an id or key still fails.Evidence: on Linux, converting the snapshot to CRLF reproduces the Windows failure message exactly. With this change,
surface::tests pass on both the CRLF and the LF file. Labelledci:windowsso the PR runs the job that failed.Surfaces: test-only change in
rustgis-engine; no user-facing behaviour.Summary by CodeRabbit